home *** CD-ROM | disk | FTP | other *** search
/ Interactive Web Graphics with Shout 3D / Interactive Web Graphics With Shout 3D.iso / pc / Shout3Ddemo / Shout3d_runtime / demos / javascript_change_fovMapping.ht < prev    next >
Text File  |  2000-11-06  |  2KB  |  44 lines

  1. <HTML>
  2. <HEAD>
  3. <TITLE>fovMapping demo -- by Shout Interactive</TITLE>
  4. </HEAD>
  5. <SCRIPT language="JavaScript">
  6. function shortest(){
  7.     vp = document.Shout3D.getCurrentBindableNode("Viewpoint");
  8.     vp.fovMapping.setValue("SHORTEST");
  9. }
  10. function horizontal(){
  11.     vp = document.Shout3D.getCurrentBindableNode("Viewpoint");
  12.     vp.fovMapping.setValue("HORIZONTAL");
  13. }
  14. function vertical(){
  15.     vp = document.Shout3D.getCurrentBindableNode("Viewpoint");
  16.     vp.fovMapping.setValue("VERTICAL");
  17. }
  18. function diagonal(){
  19.     vp = document.Shout3D.getCurrentBindableNode("Viewpoint");
  20.     vp.fovMapping.setValue("DIAGONAL");
  21. }
  22.  
  23. </SCRIPT>
  24.  
  25. <BODY>
  26. <APPLET MAYSCRIPT NAME="Shout3D" CODEBASE="../codebase" CODE="applets/ExamineApplet.class" WIDTH=75% HEIGHT=75%>
  27. <param name="src" value="models/renderTests/multimesh_chrome.wrl">
  28. <param name="backgroundColorR" value="0">
  29. <param name="backgroundColorG" value="0">
  30. <param name="backgroundColorB" value="0">
  31. <param name="panelAutoFillsApplet" value="true">
  32. <param name="pixelDoubling" value="true">
  33.  
  34. </APPLET>
  35. <BR>
  36. The fovMapping controls which dimension of the applet corresponds to 
  37. the camera field of view.   When you resize the browser, the field of view
  38. in the fovMapping dimension will remain the same.</A><BR>
  39. <A HREF="javascript: shortest()">SHORTEST fovMapping - the shorter of vertical/horizontal will match the fov.</A><BR>
  40. <A HREF="javascript: horizontal()">HORIZONTAL fovMapping - horizontal fov remains constant.</A><BR>
  41. <A HREF="javascript: vertical()">VERTICAL fovMapping - vertical fov remains constant.</A><BR>
  42. <A HREF="javascript: diagonal()">DIAGONAL fovMapping - diagonal fov remains constant.</A><BR>
  43. </BODY>
  44. </HTML>